package com.cyq.day24.regex;

import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class EmailRegex {
    public static void main(String[] args) {
        //邮箱名@域名.XXX
        //邮箱名5-12w，域名4-10W，首字母必须是字母，后缀三位或两位字母
        System.out.println("邮箱名@域名.XXX");
        Scanner scanner=new Scanner(System.in);
        String input=scanner.next();
        String regex="[\\w]{5,12}[@][a-zA-Z][\\w]{3,9}[.][a-zA-Z]{2,3}";
        Pattern pattern = Pattern.compile(regex);
        Matcher matcher=pattern.matcher(input);
        if (matcher.matches()){
            System.out.println("匹配");
        }else{
            System.out.println("不匹配");

        }
    }
}
